﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;

namespace Server.Model
{
    public class Reservation
    {
        [Key]
        public int Id { get; set; }
        [Required]
        public DateTime Date { get; set; }
        [Required]
        public virtual Car Car { get; set; }
        public virtual ICollection<PartReservation> PartReservations { get; set; }
        //[Required]
        public virtual User User { get; set; }

        public Reservation()
        {
            PartReservations = new List<PartReservation>();
        }
        public Reservation(User user, Car car)
        {
            this.User = user;
            this.Car = car;
            PartReservations = new List<PartReservation>();
        }
    }
}
